package com.scuec.groupfive.service.impl;

import com.scuec.groupfive.dto.UserGrowthDTO;
import com.scuec.groupfive.mapper.UserGrowthMapper;
import com.scuec.groupfive.service.UserGrowthService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserGrowthServiceImpl implements UserGrowthService {

    private final UserGrowthMapper userGrowthMapper;

    @Autowired
    public UserGrowthServiceImpl(UserGrowthMapper userGrowthMapper) {
        this.userGrowthMapper = userGrowthMapper;
    }

    @Override
    public List<UserGrowthDTO> getDailyUserGrowth() {
        return userGrowthMapper.selectDailyUserGrowth();
    }

    @Override
    public List<UserGrowthDTO> getWeeklyUserGrowth() {
        return userGrowthMapper.selectWeeklyUserGrowth();
    }

    @Override
    public List<UserGrowthDTO> getMonthlyUserGrowth() {
        return userGrowthMapper.selectMonthlyUserGrowth();
    }

    @Override
    public List<UserGrowthDTO> getYearlyUserGrowth() {
        return userGrowthMapper.selectYearlyUserGrowth();
    }
}